package com.demo.project_template.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.demo.project_template.entity.Order;
import com.demo.project_template.service.OrderService;
import com.demo.project_template.vo.request.order.RechargeVO;
import com.demo.project_template.vo.request.shoppingcart.CreateOrderVo;
import com.demo.project_template.vo.response.OrderVO;
import com.demo.project_template.vo.response.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单表 前端控制器
 * </p>
 *
 * @author 杨玉龙
 * @since 2023-06-19 15:56:43
 */
@Api(tags = "订单")
@RestController
@RequestMapping("/order")
public class OrderController {

    @Resource
    private OrderService orderService;

    @ApiOperation(value = "充值金币")
    @PostMapping(value = "/rechargeGold")
    public R<Map<String,String>> rechargeGold(RechargeVO rechargeVO){
        Map<String,String> result = orderService.rechargeGold(rechargeVO);
        return R.success(result);
    }
}
